package com.example.spring_ai.a2a.client.controller;

import com.example.spring_ai.a2a.client.service.AgentClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

@RestController
public class TestController {

    @Autowired
    AgentClientService agentClient;

    @GetMapping("/tasksPlan")
    public SseEmitter tasksPlan(@RequestParam("tasks") String expr) throws InterruptedException {
        return agentClient.tasksPlan(expr);
    }
}
